<div class='right-cont right-cont-less wrap-coupon-log' ng-controller='CouponUseLog'>
	<div class='title'>优惠码使用记录<i class='fa fa-spin fa-spinner' ng-if='loading'></i></div>
	<div class='content'>
		<div class='box-ops clearfix'>
			<div class='box-btn'>
				<button class='btn btn-success' ng-click='out_excel()'>导出</button>
				<button class='btn btn-warning' data-toggle='modal' data-target='.modal.bargain-total'>合计</button>
			</div>
			<div class='box-search-date'>
				<div class='input-group'>
					<span class='input-group-addon'>始</span>
					<input type='text' class='form-control input-date' ng-model='dateS'>
					<span class='input-group-addon'>末</span>
					<input type='text' class='form-control input-date' ng-model='dateE'>
					<span class='input-group-btn'>
						<button class='btn btn-primary' type='button' ng-click='load_data(1)'>搜索</button>
					</span>
				</div>
			</div>
		</div>

		<div class='box-list'>
			<table class='table table-list'>
				<tr>
					<td>记录ID <span class='fa fa-sort'></span></td>
					<td>用户ID <span class='fa fa-sort'></span></td>
					<td>用户昵称 <span class='fa fa-sort'></span></td>
					<td>真实姓名<span class='fa fa-sort'></span></td>
					<td>优惠码ID <span class='fa fa-sort'></span></td>
					<td>优惠码值 <span class='fa fa-sort'></span></td>
					<td>抵消金额 <span class='fa fa-sort'></span></td>
					<td>使用时间 <span class='fa fa-sort'></span></td>
				</tr>
				<tr ng-repeat='item in list'>
					<td>{{item.id || '未知'}}</td>
					<td>{{item.user_id || '未知'}}</td>
					<td>{{item.nickname || '未知'}}</td>
					<td>{{item.truename || '未知'}}</td>
					<td>{{item.code_id || '未知'}}</td>
					<td>{{item.code || '未知'}}</td>
					<td>{{item.amount || '未知'}}</td>
					<td>{{item.use_date || '未知'}}</td>
				</tr>
			</table>
			<div class='box-page' ng-bind-html='pageHtml'></div>
		</div>
	</div>

	<!-- 合计信息模态窗 -->
    <div class='modal fade bargain-total'>
        <div class='modal-dialog'>
            <div class='modal-content'> 
                <div class='modal-header'>
                    合计信息
                    <a class='close' data-dismiss='modal'>&times;</a>
                </div>
                <div class='modal-body'>
                    <table class='table-info'>
                        <tr>
                            <td>使用数量:</td>
                            <td>{{total.count || 0}}个</td>
                            <td>抵扣金额:</td>
                            <td>{{total.amount || 0}}元</td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>